﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _04抽象工厂
{
    public class Department
    {
        public string Name { get; set; }
        public int Id { get; set; }
    }

    public interface IDatabaseDepartment
    {
        void InsertDepartment(Department department);
        Department GetDepartment(int id);
    }

    public class SqlServerDepartment : IDatabaseDepartment
    {
        public void InsertDepartment(Department  department)
        {
            Console.WriteLine($"插入了SqlServerDepartment部门:{department.Name}");
        }
        public Department GetDepartment(int id)
        {
            Console.WriteLine($"获取了Id：{id}的部门");
            return null;
        }
    }

    public class MysqlDepartment : IDatabaseDepartment
    {
        public void InsertDepartment(Department department)
        {
            Console.WriteLine($"插入了MysqlDepartment部门:{department.Name}");
        }
        public Department GetDepartment(int id)
        {
            Console.WriteLine($"获取了Id：{id}的部门");
            return null;
        }
    }
    public class SqlliteDepartment : IDatabaseDepartment
    {
        public void InsertDepartment(Department department)
        {
            Console.WriteLine($"插入了SqlliteDepartment部门:{department.Name}");
        }
        public Department GetDepartment(int id)
        {
            Console.WriteLine($"获取了Id：{id}的部门");
            return null;
        }
    }
}
